﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageSERIX.Master" AutoEventWireup="true" CodeBehind="Planejamento.aspx.cs" Inherits="SERIX.Planejamento" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="97%" border="0" cellspacing="0" cellpadding="2" align="center">
        <tr>
            <td class="secao_titulo" style="width: 284px">
                Planejamento<hr class="linhaHorizontal" style="width: 740px" />
            </td>
        </tr>
    </table>
    <table align="center" border="0" cellpadding="2" cellspacing="0" width="97%">
        <tr>
            <td align="left" class="barra" style="height: 16px; background-color: white-Smoke;">
                <asp:Button ID="btnNovo" runat="server" Font-Bold="True" OnClick="btnNovo_Click"
                    TabIndex="1" Text="Novo" UseSubmitBehavior="False" Width="78px" />
                    <asp:TextBox runat="server" ID="tbxAno"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="center" style="color: #000000">
                <asp:GridView ID="gridView" runat="server" AutoGenerateColumns="False" CssClass="grid" 
                    EmptyDataText="Nenhum registro encontrado." 
                    DataSourceID="odsPlanejamentos" DataKeyNames="IDT_PLO" 
                    onrowdatabound="gridView_RowDataBound">
                    <AlternatingRowStyle CssClass="row_alter" />
                    <Columns>
                        <asp:BoundField HeaderText="Ano" DataField="ANO_PLO" />
                        <asp:TemplateField HeaderText="Planejamento" ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:CheckBox ID="cbxPlanejamento" runat="server" AutoPostBack="True" 
                                    oncheckedchanged="cbxPlanejamento_CheckedChanged" />
                            </ItemTemplate>

<ItemStyle Width="70px"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Programação" ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:CheckBox ID="cbxProgramacao" runat="server" AutoPostBack="True" 
                                    oncheckedchanged="cbxProgramacao_CheckedChanged" />
                            </ItemTemplate>

<ItemStyle Width="70px"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Excecução" 
                            ItemStyle-Width="70px">
                            <ItemTemplate>
                                <asp:CheckBox ID="cbxExecucao" runat="server" AutoPostBack="True" 
                                    oncheckedchanged="cbxExecucao_CheckedChanged" />
                            </ItemTemplate>

<ItemStyle Width="70px"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Qtd Min.">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:TextBox ID="tbxQtd" runat="server" AutoPostBack="True" 
                                    ontextchanged="tbxQtd_TextChanged" 
                                    Text='<%# Bind("QTDATENDIDAPROGRAMACAO_PLO") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Width="100px" />
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataRowStyle CssClass="emptyrow" />
                    <FooterStyle CssClass="footer" />
                    <HeaderStyle CssClass="header" />
                    <PagerStyle CssClass="pager" />
                    <RowStyle CssClass="row" />
                </asp:GridView>
                <asp:ObjectDataSource ID="odsPlanejamentos" runat="server" 
                    OldValuesParameterFormatString="original_{0}" 
                    onselecting="odsPlanejamentos_Selecting" SelectMethod="ObterPlanejamentos" 
                    TypeName="SERIX.Classes.CPlanejamento">
                    <SelectParameters>
                        <asp:Parameter Name="login" Type="String" />
                    </SelectParameters>
                </asp:ObjectDataSource>
            </td>
        </tr>        
    </table>
</asp:Content>
